# -*- coding: utf-8 -*-
# @File     : validators.py
# @Author   : bingjia
# @Time     : 2020/7/29 15:37
# @Desc     : User验证

from ..base.api import serializers


class LeaseServiceValidator(serializers.ModelSerializer):
    """
    租赁服务验证
    """
    service_name = serializers.CharField(max_length=250)
    service_type = serializers.CharField(max_length=32)
    service_price = serializers.DecimalField(max_digits=16, decimal_places=2)
    service_description = serializers.CharField()


class LeaseModelValidator(serializers.ModelSerializer):
    """
    租赁模型验证
    """
    model = serializers.CharField(max_length=128)
    service_price = serializers.DecimalField(max_digits=16, decimal_places=2)
    service_description = serializers.CharField()
